extends CenterContainer
@onready var label = $Label
@onready var color_rect = $ColorRect

const 颜色集:Dictionary={
	"0"=Color.DIM_GRAY,
	"2"=Color.PALE_GREEN,
	"4"=Color.LIME_GREEN,
	"8"=Color.MEDIUM_SEA_GREEN,
	"16"=Color.DARK_GREEN,
	"32"=Color.GREEN,
	"64"=Color.SKY_BLUE,
	"128"=Color.DODGER_BLUE,
	"256"=Color.MEDIUM_SLATE_BLUE,
	"512"=Color.DARK_BLUE,
	"1024"=Color.BLUE,
	"2048"=Color.LIGHT_PINK,
	"4096"=Color.ORANGE_RED,
	"8192"=Color.MEDIUM_VIOLET_RED,
	"16384"=Color.DARK_RED,
	"32768"=Color.RED,
}

# Called when the node enters the scene tree for the first time.
func _ready():
	设置数字(0)

func 设置数字(数字:int):
	var 数字str=str(数字)
	label.text=""
	if 数字>0:
		label.text=数字str
	if 颜色集.has(数字str):
		color_rect.color=颜色集[数字str]
